<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
				<!--引入vue的js资源文件-->
		<script type="text/javascript" src="js/vue.min.js"></script>
		<!--引入axios的js资源文件-->
		<script type="text/javascript" src="js/axios.min.js" ></script>
		<style>
			html,body{
				height: 100%;
				width: 100%;
				margin: 0px;
				padding: 0px;
				overflow: hidden;
			}
		</style>
		<script>
			function init() {
				var d = new Date();
				document.getElementById("dt").innerText=d.toLocaleDateString()+"   "+d.toLocaleTimeString();
				setTimeout("init();", 1000)//只会执行一次
				
			}
			setInterval("init();", 1000)//执行多次
		</script>
	</head>
	<body onload="init()">
<!--		<div style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100px; background-color: red;"></div>
		<div style="position: absolute; left: 0px; top: 0px; width: 50%; height: 100px; background-color: green;"></div>
		<div style="width: 20%; float: left; border: solid 1px; height: 100%;">1</div>
		<div style="width: 79%; float: right; border: solid 1px; height: 100%;">2</div>-->
		<div id="app">
			<div style="position: absolute; left: 0px; top: 0px; width: 100%;height: 150px; border-style: solid;">
				<div style="width: 100%; height: 100; margin-top: 10px; margin-left: 20px;">
					<img src="img/logo.jpg" style="width: 100px; height: 100px;"/>
				</div>
				<div style="height: 40px;">
					<div style="float: left; margin-left: 40px;">
						你好！{{realname}}
					</div>
					<div id="dt" style="float: right;margin-right: 30px;">
						系统时间
					</div>
				</div>
			</div>
			<div style="position: absolute; left: 0px; top: 160px; width: 200px; bottom: 0px; border-style: solid;">
				<div id="123" style="height: 30px; width: 100%; padding-left:50px ;padding-top:10px ;" v-for="item in list">
					<!--<a href="javascript:void(0);">{{item.ntext}}</a>-->
					<a v-bind:href="item.nurl" target="dl2">{{item.ntext}}</a>
				</div>
			</div>
			<div style="position: absolute; left: 210px; top: 160px; bottom: 0px; right: 0px; border-style: solid;">
				<iframe id="dl2" name="dl2" style="width: 100%; height: 100%; border: 0px; overflow: auto;" frameborder="0"></iframe>
			</div>
		</div>
		<script>
			var vue = new Vue({
				el: '#app',
				data: {
					realname:"",
					list: []
				}, 
				methods: {
					
				},
				created: function() {
					//获取用户真实姓名
					var realname = window.localStorage.getItem("realname");
					this.realname = realname;
					var uid = window.localStorage.getItem("uid");
					axios.get("TnodeServlet?uid="+uid)
						.then((res)=>{
							vue.list = res.data;
						})
						.catch((error)=>{
							
						})
				}
			})
		</script>
	</body>
</html>
